

cmake_minimum_required(VERSION 3.20)
project(pcl)

set(CMAKE_CXX_STANDARD 14)

find_package(PCL REQUIRED )
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (pcl main.cpp) #这里需要自己改对应的名称
target_link_libraries (pcl ${PCL_LIBRARIES})
set(BOOST_ROOT "/usr/include/boost")

#添加头文件搜索路径
include_directories(/usr/include)

#添加库文件搜索路径
link_directories(/usr/lib)

#用于将当前目录下的所有源文件的名字保存在变量 DIR_SRCS 中
aux_source_directory(. DIR_SRCS)

add_executable(demo ${DIR_SRCS})

#在这里根据名字boost_thread去寻找libboost_thread.a文件
target_link_libraries(pcl boost_thread boost_system)
